import request from '@/utils/request'

// 获取商品列表
export const getProList = ({ categoryId, goodsName, page }) => {
  return request.get('/goods/list', {
    params: {
      categoryId, goodsName, page
    }
  })
}

// 获取商品详情
export const getProductDetail = (goodsId) => {
  return request.get('/goods/detail', {
    params: {
      goodsId
    }
  })
}

// 获取商品评论
export const getProductComments = (goodsId, limit) => {
  return request.get('/comment/listRows', {
    params: {
      goodsId, limit
    }
  })
}
